package com.group.util;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

public class JdbcUtil {

	public static void close(ResultSet rs){
		if(rs != null){
			try {
				rs.close();
			} catch (Exception e) {
				e.getStackTrace();
			}
		}
	}
	
	public static void close(PreparedStatement pstmt){
		if(pstmt != null){
			try {
				pstmt.close();
			} catch (Exception e) {
				e.getStackTrace();
			}
		}
	}
	
	public static void close(Connection conn){
		if(conn != null){
			try {
				conn.close();
			} catch (Exception e) {
				e.getStackTrace();
			}
		}
	}
	
	public static void rollback(Connection conn){
		if(conn != null){
			try {
				conn.rollback();
			} catch (Exception e) {
				e.getStackTrace();
			}
		}
	}
}
